#include "ApplyRigidTransform.h"
#include <thrust\device_ptr.h>
#include <thrust\transform.h>


void ApplyRigidTransform::applyRT(float3* in_out, float* R, float* t, int size){
	thrust::transform(
		thrust::device_ptr<float3>(in_out),
		thrust::device_ptr<float3>(in_out) + size,
		thrust::device_ptr<float3>(in_out),
		applyTransform(R, t, true)
	);
}

void ApplyRigidTransform::applyIntrinsicInv(float3* in_out, float* A, int size){
	float zero_t[3] = {0, 0, 0};
	thrust::transform(
		thrust::device_ptr<float3>(in_out),
		thrust::device_ptr<float3>(in_out) + size,
		thrust::device_ptr<float3>(in_out),
		applyTransform(A, zero_t, false)
	);
}

